const eventEmitter = require('events')

class myEventEmitter extends eventEmitter {}

const event = new myEventEmitter()

event.on('play', value=>{
    console.log(value)
})

event.once('play1', value=>{
    console.log(`${value}只执行一次`)
})

event.emit('play', 'movie')
event.emit('play', 'av')
event.emit('play1', 'av')
event.emit('play1', 'av')
event.emit('play1', 'av')